<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{CommData}</title>
<link rel="stylesheet" href="../../css/mem_main.css" type="text/css">
<script Language="JavaScript">
<!--
var strCheckDataTip = "{checkDataTip}";
var strNoAuth = "{NoAuth}";
var strOnAuth = "{OnAuth}";
var strAuthed = "{Authed}";
var strNowType = "";
var strErrMsgContent = "{ErrMsgContent}";
var strCommDataEmptyTip = "{CommDataEmptyTip}";
var strAuthCodeEmptyTip = "{AuthCodeEmptyTip}";

function RebackProcess(){
	alert(strErrMsgContent);
}

function checkData(){
	/*if(document.CommFrm[strNowType].value.replace(/(^\s*)|(\s*$)/g, "") == ""){
		document.CommFrm[strNowType].focus();
		var strTip = document.getElementById(strNowType + "Name").innerHTML;
		alert(strCommDataEmptyTip.replace("{Tip}", strTip));
		return false;
	}*/
	with(document.CommFrm){
		if(SkypeAcc.value.replace(/(^\s*)|(\s*$)/g, "") == "1231"){
			alert(strCheckDataTip);
			SkypeAcc.value = "";
			SkypeAcc.focus();
			return false;
		}
	}
	return true;
}

function checkAuthData(){
	with(document.CommAuthFrm){
		if(AuthCode.value.replace(/(^\s*)|(\s*$)/g, "") == ""){
			var strTip = document.getElementById(document.CommAuthFrm.Type.value + "Name").innerHTML;
			alert(strAuthCodeEmptyTip.replace("{Tip}", strTip));
			AuthCode.focus();
			return false;
		}
	}
	return true;
}

function strTrim(objThis){
	objThis.value = objThis.value.replace(/(^\s*)|(\s*$)/g, "");
	if(objThis.name == "MPhone")objThis.value = objThis.value.replace(/(^0*)/g, "");
}

function open_win(strType){
	var objData = document.getElementById(strType + "Data");
	document.getElementById("user_window").style.top = objData.offsetTop + objData.clientHeight + 40;
	document.getElementById("user_window").style.left = objData.offsetLeft - 50;
	document.getElementById("user_window").style.display = "";

	document.getElementById("TipName").innerHTML = document.getElementById(strType + "Name").innerHTML;

	if(strNowType != "")document.getElementById(strNowType + "Fd").style.display = "none";
	document.getElementById(strType + "Fd").style.display = "";
	strNowType = strType;
	document.CommFrm.Type.value = strType;
}

function close_win(){
	document.getElementById("user_window").style.display = "none";
}

function sen_more_auth(strType){
	document.CommMoreAuthFrm.Type.value = strType;
	document.CommMoreAuthFrm.submit();
}

function open_auth_win(strType){
	var objData = document.getElementById(strType + "CheckStatus");
	document.getElementById("user_auth_window").style.top = objData.offsetTop + objData.clientHeight + 40;
	document.getElementById("user_auth_window").style.left = objData.offsetLeft - 50;
	document.getElementById("user_auth_window").style.display = "";

	document.getElementById("AuthTipName").innerHTML = document.getElementById(strType + "Name").innerHTML;
	document.CommAuthFrm.Type.value = strType;
	document.CommAuthFrm.AuthCode.value = "";
	document.CommAuthFrm.AuthCode.focus();
}

function close_auth_win(){
	document.getElementById("user_auth_window").style.display = "none";
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">

<form name="CommDataFrm">
<table width="770" border="0" cellspacing="0" cellpadding="0" class="cmti">
  <tr> 
    <td>{CommData}: </td>
  </tr>
</table>

<div class="ctabdv"> 
<table width="700" border="0" cellspacing="1" cellpadding="0" class="ctab">
  <tr> 
    <td colspan="6" class="cedti">{CommData}</td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed">{UserAccount}</td>
    <td colspan="5">{ShowUserAcc}</td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed" id="QQNumName">{QQ}</td>
    <td id="QQNumData">{ShowQQNum}</td>
	<td><input type="button" value="{Submit}" class="zabutton" onclick="open_win('QQNum')"></td>
	<td id="QQNumCheckStatus">{QQNumCheckStatus}</td>
	<td><input type="button" value="{Auth}" class="zabutton" onclick="open_auth_win('QQNum')" id="QQNumAuth" {QQNumDisabled}></td>
	<td><a href="Javascript:sen_more_auth('QQNum')">{MoreAuth}</a></td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed" id="SkypeAccName">{Skype}</td>
    <td id="SkypeAccData">{ShowSkypeAcc}</td>
	<td><input type="button" value="{Submit}" class="zabutton" onclick="open_win('SkypeAcc')"></td>
	<td id="SkypeAccCheckStatus">{SkypeAccCheckStatus}</td>
	<td><input type="button" value="{Auth}" class="zabutton" onclick="open_auth_win('SkypeAcc')" id="SkypeAccAuth" {SkypeAccDisabled}></td>
	<td><a href="Javascript:sen_more_auth('SkypeAcc')">{MoreAuth}</a></td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed" id="MSNName">{MSN}</td>
    <td id="MSNData">{ShowMSN}</td>
	<td><input type="button" value="{Submit}" class="zabutton" onclick="open_win('MSN')"></td>
	<td id="MSNCheckStatus">{MSNCheckStatus}</td>
	<td><input type="button" value="{Auth}" class="zabutton" onclick="open_auth_win('MSN')" id="MSNAuth" {MSNDisabled}></td>
	<td><a href="Javascript:sen_more_auth('MSN')">{MoreAuth}</a></td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed" id="EmailName">{Email}</td>
    <td id="EmailData">{ShowEmail}</td>
	<td><input type="button" value="{Submit}" class="zabutton" onclick="open_win('Email')"></td>
	<td id="EmailCheckStatus">{EmailCheckStatus}</td>
	<td><input type="button" value="{Auth}" class="zabutton" onclick="open_auth_win('Email')" id="EmailAuth" {EmailDisabled}></td>
	<td><a href="Javascript:sen_more_auth('Email')">{MoreAuth}</a></td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed" id="MPhoneName">{MPhone}</td>
    <td id="MPhoneData">{ShowAreaMPhone}</td>
	<td><input type="button" value="{Submit}" class="zabutton" onclick="open_win('MPhone')"></td>
	<td id="MPhoneCheckStatus">{MPhoneCheckStatus}</td>
	<td><input type="button" value="{Auth}" class="zabutton" onclick="open_auth_win('MPhone')" id="MPhoneAuth" {MPhoneDisabled}></td>
	<td><a href="Javascript:sen_more_auth('MPhone')">{MoreAuth}</a></td>
  </tr>
</table>
</div>
</form>
<div style="font-size: 12px">{CommTip}</div>

<form name="CommFrm" method="GET" action="UserCommupdate.php" onsubmit="return checkData();" target="setCommData">
<div id="user_window" style="display: none; position:absolute; background-color: #FFFF00">
<input type="hidden" name="Type" value="">
<table width="280" border="0" cellspacing="1" cellpadding="2" bgcolor="00558E">
  <tr>
    <td bgcolor="#FFFFFF">
		<table width="280" border="0" cellspacing="0" cellpadding="0" class="m_tab_fix" >
			<tr bgcolor="0163A2"> 
				<td width="260" style="font-size:12px">&nbsp;&nbsp;<font color="#FFFFFF" id="TipName">&nbsp;Tip</font></td>
				<td align="right" valign="top" ><a style="cursor:hand;" onClick="close_win();"><img src="/images/k_admin/edit_dot.gif" width="16" height="14"></a></td>
			</tr>
			<tr bgcolor="#000000"><td colspan="2" height="1"></td></tr>
			<tr bgcolor="#D8E4F8">
				<td colspan="2">&nbsp;&nbsp;
				<span style="display: none;" id="QQNumFd"><input type="text" name="QQNum" size="35" class="zatexted" value="{ShowQQNum}" onblur="strTrim(this)"></span>
				<span style="display: none;" id="SkypeAccFd"><input type="text" name="SkypeAcc" size="35" class="zatexted" value="{ShowSkypeAcc}" onblur="strTrim(this)"></span>
				<span style="display: none;" id="MSNFd"><input type="text" name="MSN" size="35" class="zatexted" value="{ShowMSN}" onblur="strTrim(this)"></span>
				<span style="display: none;" id="EmailFd"><input type="text" name="Email" size="35" class="zatexted" value="{ShowEmail}" onblur="strTrim(this)"></span>
				<span style="display: none;" id="MPhoneFd"><select name="Area">{AreaOption}</select><input type="text" name="MPhone" size="20" class="zatexted" value="{ShowMPhone}" onblur="strTrim(this);"></span>
				<input type="submit" value="{Send}" name="zabutton"></td></tr>
      </table>
    </td>
  </tr>
</table>
</div>
</form>

<form name="CommAuthFrm" method="GET" action="UserAuth.php" onsubmit="return checkAuthData();" target="setCommData">
<div id="user_auth_window" style="display: none; position:absolute; background-color: #FFFF00">
<input type="hidden" name="Type" value="">
<input type="hidden" name="op" value="">
<table width="280" border="0" cellspacing="1" cellpadding="2" bgcolor="00558E">
  <tr>
    <td bgcolor="#FFFFFF">
		<table width="280" border="0" cellspacing="0" cellpadding="0" class="m_tab_fix" >
			<tr bgcolor="0163A2"> 
				<td width="260" style="font-size:12px; color:#FFFFFF">&nbsp;&nbsp;<font color="#FFFFFF" id="AuthTipName">&nbsp;Tip</font>&nbsp;&nbsp;&nbsp;{AuthCode}</td>
				<td align="right" valign="top" ><a style="cursor:hand;" onClick="close_auth_win();"><img src="/images/k_admin/edit_dot.gif" width="16" height="14"></a></td>
			</tr>
			<tr bgcolor="#000000"><td colspan="2" height="1"></td></tr>
			<tr bgcolor="#D8E4F8">
				<td colspan="2">&nbsp;&nbsp;
				<input type="text" name="AuthCode" size="35" class="zatexted" value="">
				<input type="submit" value="{Send}" name="zabutton">
				</td></tr>
      </table>
    </td>
  </tr>
</table>
</div>
</form>

<form name="CommMoreAuthFrm" method="GET" action="UserAuth.php" target="setCommData">
<input type="hidden" name="Type" value="">
<input type="hidden" name="op" value="MoreAuth">
</form>

<iframe src="" width="0" height="0" name="setCommData"></iframe>
</body>
</html>
